package com.artifact.mit.mypoint.fragment.app;

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.artifact.mit.mypoint.R;
import com.artifact.mit.mypoint.adapter.OrderHistoryAdapter;
import com.artifact.mit.mypoint.service.model.OrderHistory;

public class OrderHistoryFragment extends ListFragment {
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		return inflater.inflate(R.layout.order_history, null);
	}
	
	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);
		OrderHistoryAdapter adapter = new OrderHistoryAdapter(getActivity());
		adapter.add(new OrderHistory("14/10/2013", "PO-40633", "2", R.drawable.voucher));
		adapter.add(new OrderHistory("15/10/2013", "PO-40638", "2", R.drawable.voucher));
		adapter.add(new OrderHistory("16/10/2013", "PO-40640", "2", R.drawable.voucher));
		adapter.add(new OrderHistory("17/10/2013", "PO-40646", "2", R.drawable.voucher));
		getListView().setAdapter(adapter);
	}
	
}


